class_name IntendUI
extends HBoxContainer

@onready var icon: TextureRect = $Icon
@onready var label: Label = $Label

func update(intend: Intend) -> void:
	if !intend:
		hide()
		return
		
	icon.texture = intend.icon
	icon.visible = icon.texture != null
	label.text = str(intend.num)
	label.visible = intend.num.length() > 0
	show()
